<!-- 用户协议规则 -->
<template>
	<view class="container">
		<view class="cut"></view>
			<view class="">
				<block v-for="(item,index) in rulesList" :key="index">
					<view @tap="gorules(item.id,item.title)" class="cell">
						<view>{{item.title}}</view>
						<view>
							<text class="cell-more yticon icon-you"></text>
						</view>
					</view>
				</block>
			</view>
	</view>
</template>

<script>
	import {
		protocolList
	} from "@/api/public.js"
	export default {
		data() {
			return {
				rulesList: [],
				
			}
		},
		onLoad() {
			protocolList({
				// class_id: 
			}).then(res => {
				this.rulesList = res.data;
				
			})
		},
		methods: {
			gorules(id,tit){
				uni.navigateTo({
					url: `/pages/center/help/rulesDetail?id=${id}&tit=${tit}`
				})
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		.cut{
			background-color: #eee;
			height: 20rpx;
		}
		.cell {
			height: 42rpx;
			padding: 32rpx 30rpx;
			background: rgba(255, 255, 255, 1);
			border-bottom: 1rpx solid rgba(238, 238, 238, 1);
			display: flex;
			justify-content: space-between;
		
			view:nth-of-type(1) {
				font-size: 30rpx;
				font-weight: 400;
				color: rgba(51, 51, 51, 1);
				line-height: 42rpx;
			}
		
			view:nth-of-type(2) {
				display: flex;
				line-height: 42rpx;
		
				text {
					margin-left: 10rpx;
					font-size: 28rpx;
					font-weight: 400;
					color: rgba(153, 153, 153, 1);
				}
			}
		}
	}
</style>
